class Solution {
public:
    vector<int> numberGame(vector<int>& nums) {
        sort(nums.begin(), nums.end());
        int n = nums.size();
        vector<int>ans;
        for (int x : nums) {
            ans.push_back(x);
        }
        for (int i = 0; i < n; i += 2) {
            swap(ans[i], ans[i + 1]);
        }
        return ans;
    }
};